package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户钱包充值记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_wallet_recharge_log")
public class UserWalletRechargeLog extends Model<UserWalletRechargeLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "order_id", type = IdType.NONE)
    private String orderId;
    /**
     * 总金额
     */
    @TableField("all_amount")
    private BigDecimal allAmount;
    /**
     * 赠送金额
     */
    @TableField("give_amount")
    private BigDecimal giveAmount;
    /**
     * 实际支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 充值时间
     */
    @TableField("recharge_time")
    private LocalDateTime rechargeTime;
    /**
     * 支付状态:0未支付1支付成功2支付失败3已支付4取消支付
     */
    @TableField("pay_status")
    private Integer payStatus;
    /**
     * 充值类型:1用户自主充值2后台充值
     */
    @TableField("recharge_type")
    private Integer rechargeType;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 套餐编码
     */
    @TableField("plan_code")
    private String planCode;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 操作组织
     */
    @TableField("operate_org_id")
    private String operateOrgId;
    /**
     * 套餐发布ID
     */
    @TableField("publish_id")
    private String publishId;

    public void freeData() {
        this.orderId = null;
        this.allAmount = null;
        this.giveAmount = null;
        this.payAmount = null;
        this.rechargeTime = null;
        this.payStatus = null;
        this.rechargeType = null;
        this.userId = null;
        this.planCode = null;
        this.operator = null;
        this.operateOrgId = null;
        this.publishId = null;
    }

}
